package businessdelegate;

/**
 * @Author: linKe
 * @Date: 2022/1/14 21:53
 * @FileName: Business
 * @version: 1.0
 * @Description: 业务调用方法
 */
public class BusinessLookupService {

    private LinServiceImpl linServiceImpl;
    private KeServiceImpl keServiceImpl;

    public void setLinService(LinServiceImpl linServiceImpl) {
        this.linServiceImpl = linServiceImpl;
    }

    public void setKeService(KeServiceImpl keServiceImpl) {
        this.keServiceImpl = keServiceImpl;
    }

    public BusinessService getService(ServiceType type) {
        // 判断服务所属类型
        if (type == ServiceType.LIN) {
            return linServiceImpl;
        } else if (type == ServiceType.KE) {
            return keServiceImpl;
        }
        return null;
    }

}

